var value=2;
var foo={
    value:1
}
function bar(name,age){
    this.habbit='shopping';
    console.log(this.value);
    console.log(name);
    console.log(age);
    this.friend='xiaofeng';
}
bar.prototype.friend='xiaoming';
var resultFun=bar.bind(foo,'zhangsan');
var obj=new resultFun(11);

console.log(obj.habbit);
console.log(obj.friend);